<?php
namespace app\controller;
use app\BaseController;
use think\facade\Db;

class Data extends  BaseController
{
    public function index()
    {
        //db类
//        $result = Db::table('fa_admin')->where('id', 1)->find();
        //容器
//        $result = app("db")->table('fa_admin')->where('id', 1)->find();
        $result = Db::table('fa_auth_group')
//            ->order("id", "desc")
//            ->limit(2,2)
                ->where("id", ">", 2)
//                ->fetchSql()
//            ->page(2,1)
            ->select();

            echo Db::getlastSql();
        dump($result);
    }
}